package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.bean.Result;
import com.example.demo.entity.User;
import com.example.demo.exception.SPIPException;
import com.example.demo.intf.LoginInterface;

/**
 * @author 88377761
 *
 */
@RestController
@RequestMapping("/user")
public class LoginController {
	@Autowired
	LoginInterface loginInterface;

	@RequestMapping("/login")
	public Result login(User user) throws SPIPException {
		return loginInterface.login(user);
	}
}
